<!-- search area   -->
<div class="row searchLineWrap">
	<form class="form-horizontal" method="post" action="${cxt!}/platform/task/list" id="searchForm">
		  <div class="row">
		    <div class="col-md-5">
		      <div class="form-group">
		         <label  class="col-md-4 control-label">${_res["gtask.taskname"]}</label>
		         <div class="col-md-8">
		            <input type="text" class="form-control" name="gTask.l_taskname" placeholder="${_res["gtask.taskname"]}" value="${paramMap['gTask.l_taskname']}"/>
		         </div>
		       </div>
		    </div>
	    
			<div class="col-md-5">
		      <div class="form-group">
		         <label  class="col-md-4 control-label">${_res["gtask.active"]}</label>
		         <div class="col-md-8">
		          	  <#dict type="select" name="gTask.eq_active"  dictCode="COMMON_STATUS" value="${paramMap['gTask.eq_active']}" />
		         </div>
		       </div>
		    </div>
		  </div>
		 
		 <div class="row">
			<div class="col-md-5">
		      <div class="form-group">
		         <label  class="col-md-4 control-label">${_res["gtask.command"]}</label>
		         <div class="col-md-8">
		          	  <#dict type="select" name="gTask.l_command"  dictCode="TASK_COMMAND" value="${paramMap['gTask.l_command']}" />
		         </div>
		       </div>
		    </div>
			
		    <div class="col-md-5">
				<div style="display:none">
						<input type="text" class="form-control" name="gTask.eq_deletedsw" value="0"/>
				</div>      
				 <div class="col-md-2">
				 	<div class="form-group">
				      <button type="button" class="btn btn-primary pull-left" id="btnSearch" onclick="ajaxForm('content','searchForm')">
				      <i class="fa fa-search m-l-sm m-r-xs"></i>${_res["system.search"]}</button>
				  	</div>
				 </div>
			</div>
	  </div>
	</form>
</div>
<!-- search area end  -->

<div class="row searchLineWrap">
	<% if(hasPrivilegeUrl("taskAdd")){ %>
		<p><a href="javascript:void(0);" onClick="ajaxContent('/platform/task/add/a');" class="btn btn-primary pull-left">${_res["gtask.addtask"]}</a><div class="clearfix"></div></p>
	<% } %>
	<table class="table table-striped table-bordered table-hover">
	    <thead>
	        <tr>
	            <th width="25%">${_res["gtask.taskname"]}</th>
	            <th width="25%">${_res["gtask.command"]}</th>
	            <th width="10%">${_res["gtask.active"]}</th>
	            <th width="15%">${_res["gtask.period"]}</th>
	            <th width="25%">${_res["system.operator"]}</th>
	        </tr>
	    </thead>
	    <tbody>
		    <% for(task in splitPage.list!){ %>
		      <tr >
		            <td>${task.taskname!}</td>
		            <td><#dict type="lable" value='${task.command!}' dictCode="TASK_COMMAND"/></td>
		            <td><#dict type="lable" value='${task.active!}' dictCode="COMMON_STATUS"/></td>
		            <td><#dict type="lable" value='${task.period!}' dictCode="TASK_PERIOD"/></td>
		            <td>
		            	<% if(hasPrivilegeUrl("taskView")){ %>
		              	 	<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/platform/task/view/${task.id!}');">${_res["system.view"]}</button>
		              	<% } %>
		              	<% if(hasPrivilegeUrl("taskUpdate")){ %>
		              	 	<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/platform/task/update/e-${task.id!}')">${_res["system.edit"]}</button>
		               	<% } %>
		               	<% if(hasPrivilegeUrl("taskDelete")){ %>
		               	 	<button type="button" class="btn btn-sm btn-link" onClick="ajaxDelete('/platform/task/delete/${task.id!}')">${_res["system.delete"]}</button>
		              	<% } %>
		              	<% if(hasPrivilegeUrl("taskRunNow")){ %>
		               	 	<button type="button" class="btn btn-sm btn-link" onClick="ajaxContentConfirm('/platform/task/runnow/${task.id!}')">${_res["gtask.runnow"]}</button>
		              	<% } %>
		              	<% if(hasPrivilegeUrl("taskRunHistory")){ %>
		               	 	<button type="button" class="btn btn-sm btn-link" onClick="ajaxContent('/platform/task/runhistory/${task.id!}')">${_res["gtask.runhistory"]}</button>
		              	<% } %>
		            </td>
		      </tr>
		     <% } %>
	    </tbody>
	</table>
	<div id="splitPageDiv">
		<#page formId="searchForm"  />
	</div>
	<#nav />
</div>

<script type="text/javascript">
	/*(function pageInit(){
		//页面加载后立即执行一次查询
		$("#search").click();
		
	})();*/
	
	$(document).ready(function(){
		//$("#btnSearch").click();
	});

</script>